package ddd.ajava.chapter7.question8;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class StudentManager {
	private Map<String,Student> stuMap=new HashMap<String, Student>();
	private List<Student> stuList=new ArrayList<Student>();
	public boolean saveStudent(String name,int age){
		if(name!=null&&!stuMap.containsKey(name)) {
			stuMap.put(name, new Student(name,age));
			return true;
		}
		return false;
	}
	
	public boolean saveStudent(Student student){
		stuList.add(student);
		return false;
	}
}
